<template>
  <div class="login-container common-scrollbar">
    <div class="title">边缘计算盒单设备平台 AIBOX Platform</div>
    <div class="box">
      <slot></slot>
    </div>
  </div>
</template>

<script setup lang="ts"></script>

<style lang="less" scoped>
@input-placeholder-color: #e2e5e8;
@input-placeholder-fontSize: 12px;

.login-container {
  width: 100vw;
  height: 100vh;
  position: relative;
  background: url('@/assets/images/login-bg.png') 0 0 / 100% 100% no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  min-width: 1000px;

  .title {
    font-size: 36px;
    color: #fff;
    font-weight: bold;
  }

  .box {
    width: 514px;
    height: 514px;
    border-radius: 15px;
    background: rgb(2 32 85 / 30.2%);
    box-sizing: border-box;
    border: 2px solid #369;
    border-image: linear-gradient(
        136deg,
        rgb(237 244 255 / 49%) 5%,
        rgb(88 130 193 / 11%) 44%,
        rgb(255 255 255 / 50%) 96%
      )
      2.23;
    backdrop-filter: blur(18.62px);
    padding: 54px 0;
    display: flex;
    flex-direction: column;
    align-items: center;

    :deep(.container-wrap) {
      .name {
        font-size: 28px;
        color: white;
        line-height: 40px;
        margin-bottom: 14px;
      }

      .t-form {
        width: 100%;

        .t-form__item {
          margin-bottom: 18px;

          .t-form__label {
            color: #fff;
            font-size: 14px;
          }

          .t-input {
            height: 40px;
            border-radius: 4px;
            background: #fff;
            box-shadow: 0 0 6px #fff inset;
            padding-left: 18px;

            .t-icon {
              color: #a5b4cb;
            }

            &.t-input--focused {
              .t-icon {
                color: #a5b4cb;
              }
            }

            .t-input__inner {
              color: #333;
              background: #fff;

              &::placeholder {
                color: @input-placeholder-color;
                font-size: @input-placeholder-fontSize;
              }
            }
          }

          .t-icon {
            color: var(--td-brand-color);
          }

          // 验证码
          .code-wrap {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            position: relative;
            gap: 36px;

            .t-input__wrap {
              width: 168px;
            }

            .code-img {
              width: 168px;
              height: 40px;
              background-color: #fff;
              border-radius: 4px;
              cursor: pointer;
            }

            .code-text,
            .code-forget {
              font-size: 12px;
              color: #f1d333;
              cursor: pointer;
              position: absolute;
              right: 6px;
              text-decoration: underline;
            }

            .code-text {
              bottom: -25px;
            }

            .code-forget {
              top: -45px;
            }
          }
        }
      }

      // 登录按钮
      .login-btn {
        width: 100%;
        height: 40px;
        border-radius: 4px;
        color: #fff;
        font-size: 16px;
        margin-top: 50px;
        letter-spacing: 2px;
        font-weight: bold;
      }
    }
  }
}
</style>
